package com.wing.order.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.common.utils.JsonResult;
import com.wing.order.model.entity.InventoryInoutJob;
import com.wing.order.model.request.InventoryInoutJobForm;
import com.wing.order.model.request.InventoryJobForm;
import com.wing.order.model.response.*;

import java.util.List;
import java.util.Map;

/**
 * 出/入库作业单记录-Service
 *
 * @author
 */
public interface InventoryInoutJobService extends IService<InventoryInoutJob> {

    /**
     * 添加
     *
     * @param inventoryInoutJobForm
     * @return
     */
    int add(InventoryInoutJobForm inventoryInoutJobForm);

    /**
     * 列表-app
     *
     * @param params
     * @return
     */
    List<InventoryInoutJobVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     * @return
     */
    Page<InventoryInoutJobVO> pageList4app(Page page, Map<String, Object> params);

    Page<InventoryInoutJobVO> pageList4loading(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     * @return
     */
    InventoryInoutJobVO get4appById(Long id);

    /**
     * 入库作业单
     *
     * @param planId
     * @param signStationId
     * @param remark
     * @param quantity
     * @param productJson
     * @return
     */
    public JsonResult addInventoryInoutJob(Long planId, Long signStationId, String remark, Long quantity, String productJson,String signStationName,Long boxId);

    IPage<InventoryInoutJobVO> getInventoryInoutJobPageList(InventoryInoutJob inventoryInoutJob, Integer page, Integer limit);

    /**
     * 出库作业单
     *
     * @param inventoryJobForm
     * @return
     */
    public void addOutInventoryInoutJob(InventoryJobForm inventoryJobForm);

    /**
     * 签收入库作业单
     *
     * @param warhouseId 仓库ID
     */
    JsonResult saveInventoryInoutJob(List<OrderDeliveryVO> deliveryVOList, Integer warhouseId);

    JsonResult outOfStock(ScanDeliveryVo scanPickupInfo, Integer realReceive, String remark);

    void inventoryIn(List<OrderDeliveryLabelVO> labels);

    /**
     * 添加入库作业
     * @param inventoryInoutJobVO
     * @return
     */
    void addStorageWork (InventoryInoutJobVO inventoryInoutJobVO);
    /**
     * 查询入作业已入库包装条码
     * @param jobId
     * @return
     */
    List<InventoryJobLabelVO> getStoragePackLabel(Long jobId);
    /**
     * 添加出库作业
     * @param inventoryInoutJobVO
     * @return
     */
    void addOutWork (InventoryInoutJobVO inventoryInoutJobVO);
}
